package edu.uz.issilab.rdfserializer.interfaces;

import java.beans.ExceptionListener;
import java.beans.XMLEncoder;

/** RDFEncodeable objects support the textual deserialization of Java objects.
 * 
 * Any given implementing class is used to read RDF documents 
 * created using the <code>RDFEncodeable</code> interface. 
 * For more information you might also want to check out
 * <a
 href="http://java.sun.com/products/jfc/tsc/articles/persistence3">Long Term Persistence of JavaBeans Components: XML Schema</a>,
 * an article in <em>The Swing Connection.</em>
 * @see XMLEncoder
 * @see java.io.ObjectInputStream
 */
public interface RDFDecodeable { 
    
    
   

    
    /**
     * This method closes the input stream associated 
     * with this stream. 
     */
    public void close() ;
    
    /** 
     * Sets the exception handler for this stream to <code>exceptionListener</code>. 
     * The exception handler is notified when this stream catches recoverable 
     * exceptions.
     * 
     * @param exceptionListener The exception handler for this stream;
     * if <code>null</code> the default exception listener will be used. 
     *
     * @see #getExceptionListener
     */ 
    public void setExceptionListener(ExceptionListener exceptionListener) ;
    /**
     * Gets the exception handler for this stream. 
     * 
     * @return The exception handler for this stream. 
     *     Will return the default exception listener if this has not explicitly been set.
     *
     * @see #setExceptionListener
     */ 
    public ExceptionListener getExceptionListener() ;
    
    /** 
     * Reads the next object from the underlying input stream. 
     *
     * @return the next object read
     *
     * @throws ArrayIndexOutOfBoundsException if the stream contains no objects 
     *         (or no more objects)
     *
     * @see RDFEncodeable#writeObject
     */ 
    public Object readObject() ; 
	
    /** 
     * Sets the owner of this decoder to <code>owner</code>. 
     * 
     * @param owner The owner of this decoder. 
     *
     * @see #getOwner
     */ 
    public void setOwner(Object owner);   
    /**
     * Gets the owner of this decoder. 
     * 
     * @return The owner of this decoder. 
     *
     * @see #setOwner
     */ 
    public Object getOwner() ;
}
    
